using System;

namespace Acme.BookStore.Redis
{
    /// <summary>
    /// Redis配置选项
    /// </summary>
    public class BookStoreRedisOptions
    {
        /// <summary>
        /// 是否启用Redis
        /// </summary>
        public bool IsEnabled { get; set; }
        
        /// <summary>
        /// Redis连接字符串
        /// </summary>
        public string Configuration { get; set; }
        
        /// <summary>
        /// Redis实例名称
        /// </summary>
        public string InstanceName { get; set; }
        
        /// <summary>
        /// 连接超时时间(毫秒)
        /// </summary>
        public int ConnectionTimeout { get; set; } = 5000;
        
        /// <summary>
        /// 重试连接次数
        /// </summary>
        public int ConnectRetry { get; set; } = 3;
        
        /// <summary>
        /// 默认过期时间(秒)
        /// </summary>
        public int DefaultExpirationTime { get; set; } = 300;
        
        /// <summary>
        /// 默认滑动过期时间(秒)
        /// </summary>
        public int DefaultSlidingExpirationTime { get; set; } = 60;
    }
} 